@import "~pc/styles/lib_var.less";
@import "~pc/styles/lib_screen.less";
@import "~pc/styles/lib_mixins.less";

.typeSelect {
  width: 240px;
  padding: 8px 0 16px;
  display: flex;
  flex-direction: column;

  h1 {
    font-size: 16px;
    color: var(--firstLevelText);
    margin-bottom: 8px;
    padding: 0 16px;
  }

  .typeSelectItem {
    width: 100%;
    height: 40px;
    padding: 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    color: var(--textCommonPrimary);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;

    .icon {
      display: flex;
    }

    .desc {
      padding-left: 8px;
      box-sizing: border-box;
      text-align: center;
    }

    .title {
      word-break: keep-all;
      width: 100%;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      font-size: 14px;
    }

    .beta {
      margin-left: auto;
      font-size: 12px;
      color: var(--rainbowPurple5);
      background-color: var(--rainbowPurple2);
      border-radius: 4px;
      padding: 2px 6px;
    }

    .new {
      margin-left: auto;
      font-size: 12px;
      color: var(--textStaticPrimary);
      background-color: var(--rainbowRed5);
      border-radius: 12px;
      padding: 2px 6px;
    }

    @media (any-hover: hover) {
      &:hover {
        background-color: var(--bgBglessHover);
      }
      &:active {
        background-color: var(--bgBglessActive);
      }
    }

    &.active {
      color: var(--textBrandDefault);
      background-color: var(--bgBrandLightDefault);
    }
  }
}

.fieldIcon {
  width: 38px;
  height: 38px;
}

.tip {
  width: 240px;
  background: var(--fc1);
  color: var(--static-black);
  padding: 8px;
  border-radius: 4px;

  h3 {
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--defaultBg);
  }

  p {
    color: rgba(var(--defaultBg-rgb), 70%);
    font-size: 12px;
    margin-bottom: 0;
  }
}

.last1MarginBottom0 {
  &:nth-last-child(1) {
    margin-bottom: 0;
  }
}

.last2MarginBottom0 {
  .last1MarginBottom0();

  &:nth-last-child(2) {
    margin-bottom: 0;
  }
}

.last3MarginBottom0 {
  .last2MarginBottom0();

  &:nth-last-child(3) {
    margin-bottom: 0;
  }
}

.searchInput {
  margin: 0 16px 16px;
}

.noSearchTip {
  color: var(--thirdLevelText);
  font-size: 14px;
  text-align: center;
  margin-top: 50%;
}

.fieldDisplayList {
  &:first-child {
    margin-bottom: 16px;
  }

  h2 {
    font-size: 13px;
    color: var(--thirdLevelText);
    margin-bottom: 4px;
    padding-left: 8px;
  }

  main {
    margin-top: 0;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    flex-wrap: wrap;
  }
}

.scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 8px;
}

@media screen and(max-width: @w-md) {
  .typeSelect {
    width: 100%;
    height: 100%;

    h1 {
      font-size: 18px;
      font-weight: bold;
    }

    .typeSelectItem {
      border: none;

      &.active {
        background-color: var(--primaryColor);
        color: var(--defaultBg);
        font-size: 13px;

        svg {
          fill: var(--defaultBg);
        }
      }
    }
  }
}

.scrollShadow {
  position: absolute;
  left: 0;
  bottom: 24px;
  width: 100%;
  height: 20px;
  background: var(--bgGradientVertical);
  pointer-events: none;
}
